﻿using System;

namespace Smart.Windows.Navigation
{
    /// <summary>
    /// ビュー遷移イベント引数
    /// </summary>
    public class ViewForwardEventArgs : EventArgs
    {
        private readonly object viewId;
        private readonly object previousViewId;
        private readonly object previousView;
        private readonly object[] parameters;
        private readonly bool isPopBack;

        /// <summary>
        /// 遷移先ビューID
        /// </summary>
        public object ViewId
        {
            get { return this.viewId; }
        }

        /// <summary>
        /// 遷移元ビューID
        /// </summary>
        public object PreviousViewId
        {
            get { return this.previousViewId; }
        }

        /// <summary>
        /// 遷移元ビューインスタンス
        /// </summary>
        public object PreviousView
        {
            get { return this.previousView; }
        }

        /// <summary>
        /// パラメータ
        /// </summary>
        public object[] Parameters
        {
            get { return this.parameters; }
        }

        /// <summary>
        /// ポップ遷移判定
        /// </summary>
        public bool IsPopBack
        {
            get { return this.isPopBack; }
        }

        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="viewId">遷移先ビューID</param>
        /// <param name="previousViewId">遷移元ビューID</param>
        /// <param name="previousView">遷移もとビューインスタンス</param>
        /// <param name="parameters">パラメータ</param>
        /// <param name="isPopBack">ポップ遷移判定</param>
        public ViewForwardEventArgs(object viewId, object previousViewId, object previousView, object[] parameters, bool isPopBack)
        {
            this.viewId = viewId;
            this.previousViewId = previousViewId;
            this.previousView = previousView;
            this.parameters = parameters;
            this.isPopBack = isPopBack;
        }
    }
}